{extend name="public:base"/}


{block name="title"}编辑商品{/block}
{block name="style"}{/block}

{block name="main"}

<section class="content" xmlns="http://www.w3.org/1999/html">
    <div class="row">

        <div class="col-md-12">

            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">编辑商品</h3>
                        </div>
                        <form  id="pt_form" method="post">
                            <div class="box-body">

                                <div class="clearfix"></div>

     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="mer_id" class="control-label Validform_label" for="pri_name">商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="mer_id" class="form-control" name="mer_id" placeholder="请输入商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)" value="<?=$model['mer_id']?>" datatype="n" ignore="ignore"  nullmsg="请填写商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
                    
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="store_name" class="control-label Validform_label" for="pri_name">商品名称</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="store_name" class="form-control" name="store_name" placeholder="请输入商品名称" value="<?=$model['store_name']?>" datatype="s2-128"  nullmsg="请填写商品名称">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="store_info" class="control-label Validform_label" for="pri_name">商品简介</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="store_info" class="form-control" name="store_info" placeholder="请输入商品简介" value="<?=$model['store_info']?>" datatype="s2-256"  nullmsg="请填写商品简介">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="keyword" class="control-label Validform_label" for="pri_name">关键字</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="keyword" class="form-control" name="keyword" placeholder="请输入关键字" value="<?=$model['keyword']?>" datatype="s2-256"  nullmsg="请填写关键字">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="bar_code" class="control-label Validform_label" for="pri_name">产品条码（一维码）</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="bar_code" class="form-control" name="bar_code" placeholder="请输入产品条码（一维码）" value="<?=$model['bar_code']?>" datatype="s2-15" ignore="ignore"  nullmsg="请填写产品条码（一维码）">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="cate_id" class="control-label Validform_label" for="pri_name">分类id</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="cate_id" class="form-control" name="cate_id" placeholder="请输入分类id" value="<?=$model['cate_id']?>" datatype="s2-64"  nullmsg="请填写分类id">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="price" class="control-label Validform_label" for="pri_name">商品价格</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="price" class="form-control" name="price" placeholder="请输入商品价格" value="<?=$model['price']?>" datatype="n" ignore="ignore" regex="/\d+\.?\d{0,2}/">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="vip_price" class="control-label Validform_label" for="pri_name">会员价格</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="vip_price" class="form-control" name="vip_price" placeholder="请输入会员价格" value="<?=$model['vip_price']?>" datatype="n" ignore="ignore" regex="/\d+\.?\d{0,2}/">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="ot_price" class="control-label Validform_label" for="pri_name">市场价</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="ot_price" class="form-control" name="ot_price" placeholder="请输入市场价" value="<?=$model['ot_price']?>" datatype="n" ignore="ignore" regex="/\d+\.?\d{0,2}/">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="postage" class="control-label Validform_label" for="pri_name">邮费</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="postage" class="form-control" name="postage" placeholder="请输入邮费" value="<?=$model['postage']?>" datatype="n" ignore="ignore" regex="/\d+\.?\d{0,2}/">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="unit_name" class="control-label Validform_label" for="pri_name">单位名</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="unit_name" class="form-control" name="unit_name" placeholder="请输入单位名" value="<?=$model['unit_name']?>" datatype="s2-32"  nullmsg="请填写单位名">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="sort" class="control-label Validform_label" for="pri_name">排序</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="sort" class="form-control" name="sort" placeholder="请输入排序" value="<?=$model['sort']?>" datatype="n" ignore="ignore"  nullmsg="请填写排序">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="sales" class="control-label Validform_label" for="pri_name">销量</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="sales" class="form-control" name="sales" placeholder="请输入销量" value="<?=$model['sales']?>" datatype="n" ignore="ignore"  nullmsg="请填写销量">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="stock" class="control-label Validform_label" for="pri_name">库存</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="stock" class="form-control" name="stock" placeholder="请输入库存" value="<?=$model['stock']?>" datatype="n" ignore="ignore"  nullmsg="请填写库存">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">状态（0：未上架，1：上架）                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_show" value="0" datatype="*"  nullmsg="请填写状态（0：未上架，1：上架）">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_show" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">是否热卖                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_hot" value="0" datatype="*"  nullmsg="请填写是否热卖">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_hot" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">是否优惠                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_benefit" value="0" datatype="*"  nullmsg="请填写是否优惠">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_benefit" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">是否精品                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_best" value="0" datatype="*"  nullmsg="请填写是否精品">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_best" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">是否新品                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_new" value="0" datatype="*"  nullmsg="请填写是否新品">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_new" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="description" class="control-label Validform_label" for="pri_name">产品描述</label>
                                    </div>
                                    <div class='col-sm-10'>

                                        <textarea id="description" class="form-control" name="description" placeholder="请输入产品描述"   nullmsg="请填写产品描述" > <?=$model['description']?></textarea>
                                        <div class="help-block"></div>
                                    </div>
                                </div>
     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">是否包邮                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_postage" value="0" datatype="*"  nullmsg="请填写是否包邮">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_postage" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">商户是否代理 0不可代理1可代理                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="mer_use" value="0" datatype="*"  nullmsg="请填写商户是否代理 0不可代理1可代理">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="mer_use" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="give_integral" class="control-label Validform_label" for="pri_name">获得积分</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="give_integral" class="form-control" name="give_integral" placeholder="请输入获得积分" value="<?=$model['give_integral']?>" datatype="n" regex="\d+\.?\d{0,2}"  nullmsg="请填写获得积分">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="cost" class="control-label Validform_label" for="pri_name">成本价</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="cost" class="form-control" name="cost" placeholder="请输入成本价" value="<?=$model['cost']?>" datatype="n" regex="\d+\.?\d{0,2}"  nullmsg="请填写成本价">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">秒杀状态 0 未开启 1已开启                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_seckill" value="0" datatype="*"  nullmsg="请填写秒杀状态 0 未开启 1已开启">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_seckill" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">砍价状态 0未开启 1开启                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_bargain" value="0" datatype="*"  nullmsg="请填写砍价状态 0未开启 1开启">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_bargain" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">是否优品推荐                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div id="is_privilege">
                                      
                                            <label style="color:#636f7a"><input type="radio" name="is_good" value="0" datatype="*"  nullmsg="请填写是否优品推荐">否</label>

                                            
                                            <label style="color:#636f7a"><input type="radio" name="is_good" value="1" >是</label>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="ficti" class="control-label Validform_label" for="pri_name">虚拟销量</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="ficti" class="form-control" name="ficti" placeholder="请输入虚拟销量" value="<?=$model['ficti']?>" datatype="n" ignore="ignore"  nullmsg="请填写虚拟销量">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="browse" class="control-label Validform_label" for="pri_name">浏览量</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="browse" class="form-control" name="browse" placeholder="请输入浏览量" value="<?=$model['browse']?>" datatype="n" ignore="ignore"  nullmsg="请填写浏览量">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="code_path" class="control-label Validform_label" for="pri_name">产品二维码地址(用户小程序海报)</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="code_path" class="form-control" name="code_path" placeholder="请输入产品二维码地址(用户小程序海报)" value="<?=$model['code_path']?>" datatype="s2-64" ignore="ignore"  nullmsg="请填写产品二维码地址(用户小程序海报)">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="soure_link" class="control-label Validform_label" for="pri_name">淘宝京东1688类型</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="soure_link" class="form-control" name="soure_link" placeholder="请输入淘宝京东1688类型" value="<?=$model['soure_link']?>" datatype="s2-255" ignore="ignore"  nullmsg="请填写淘宝京东1688类型">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
                                 </div>
                            <div class="box-footer text-center">
                                <button class="btn btn-primary" type="submit">保存</button>
                                <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{/block}

{block name="js"}
<script>

    var validate = validator('#pt_form');
    
</script>
{/block}